var publicJs = require("../../public.js");

Page({
  data: {
    mobile: '',
    disabled: true
  },
  mobileChange: function (e) {
    //手机号
    if (e.detail.value.length > 0) {
      this.setData({
        disabled: false
      });
    } else {
      this.setData({
        disabled: true
      });
    }
    this.data.mobile = e.detail.value;
  },
  regTwo: function () {
    //注册2
    if (!publicJs.isTelphone(this.data.mobile)) {
      wx.showModal({
        title: '错误',
        content: '请填写正确的手机号！',
        showCancel: false,
        success: function (res) { }
      })
      return false;
    }
    wx.navigateTo({ url: "regTwo?mobile=" + this.data.mobile })
  }
})